package com.galaxy.payment.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 资金流水类型枚举
 */
@Getter
@AllArgsConstructor
public enum FlowTypeEnum {
    
    RECHARGE(1, "充值"),
    CONSUME(2, "消费"),
    REFUND(3, "退款"),
    POINTS_EXCHANGE(4, "积分兑换");

    private final Integer code;
    private final String info;

    public static String getInfo(Integer code) {
        for (FlowTypeEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value.getInfo();
            }
        }
        return "";
    }
} 